﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DigDes.DS2012.DataLoader;
using System.Threading.Tasks;


namespace DigDes.DS2012.ProcessingService
{
    public class ProcessingService : IProcessingService
    {
        /// <summary>
        /// Менеджер загрузки. Управляет загрузчиками.
        /// </summary>
        /// 

        
        private static DataLoadManager _dataLoadManager = new DataLoadManager();

        public static void OnStart()
        {
            _dataLoadManager.ImportLoaders();
        }

        public void LoadData(string fileName, byte[] fileBytes)
        {
            (new Task(() => _dataLoadManager.LoadData(fileName, fileBytes))).Start();
        }

        public string Ping()
        {
            return "DigDes.DS2012.ProcessingService Pong";
        }
    }
}
